home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 10777 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  790 b 

  1. Path: news.ov.com!news
  2. From: glenn@ov.com (Fletcher.Glenn@ov.com)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: operator % - compiler error
  5. Date: 20 Mar 1996 00:07:44 GMT
  6. Organization: OpenVision
  7. Message-ID: <4ini8g$i1u@spanky.pls.ov.com>
  8. References: <4ihuuh$6ul@hatathli.csulb.edu>
  9. Reply-To: glenn@ov.com
  10. NNTP-Posting-Host: foghorn.pls.ov.com
  11.  
  12. In article 6ul@hatathli.csulb.edu, davidcho@csulb.edu (David Cho) writes:
  13. >When I try to compile, I get an erro message for the following line:        
  14. >
  15. >
  16. >x=663608941*y%pow(2,32)  /*I want remainder*/
  17. >
  18. >But the error message says "illegal use of floating point".  What does 
  19. >that mean?  Isn't % used a an operator to calcuate the remainder?
  20.  
  21.  
  22. You're missing the point.  % needs an integer argument, and pow()
  23. returns a double.
  24.  
  25.             Fletcher.Glenn@ov.com
  26.  
  27.  
  28.  
  29.